package com.hxzy.controller.admin.employee.resp;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.hxzy.common.annon.DictTypeAnnon;
import com.hxzy.common.enums.DictTypeEnum;
import com.hxzy.util.easyexcel.convert.DictTypeConvert;
import com.hxzy.util.easyexcel.convert.UrlToImageConverter;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.util.Date;

/**
 * @Desc 描述
 * @Author: admin
 * @Date: 2023/06/30/14:33
 */
@Getter
@Setter
@ToString
@ExcelIgnoreUnannotated
@ContentRowHeight(150)
public class EmployeeResp {

    @ExcelProperty(value = "编号")
    private Long id;

    /**
     * 登录账户
     */
    @ExcelProperty(value = "登录账户")
    private String loginName;

    /**
     * 性别(0 女 1 男)
     */
    @DictTypeAnnon(value = DictTypeEnum.sys_user_sex)
    @ExcelProperty(value = "性别", converter = DictTypeConvert.class)
    private String gender;

    /**
     * 状态（1停用，0正常）
     */
    @DictTypeAnnon(value = DictTypeEnum.sys_normal_disable)
    @ExcelProperty(value = "状态", converter = DictTypeConvert.class)
    private String status;

    /**
     * 头像
     */
    @ColumnWidth(30)
    @ExcelProperty(value = "头像",converter = UrlToImageConverter.class)
    private String avatar;

    /**
     * 创建时间
     */
    @ColumnWidth(30)
    @ExcelProperty(value = "创建时间")
    @DateTimeFormat(value = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date createTime;

}
